#ifndef __SOR_H_
#define __SOR_H_

#include <math.h>

#include "cfd_utils.h"

/**
 * One GS iteration for the pressure Poisson equation. Besides, the routine must
 * also set the boundary values for P according to the specification. The
 * residual for the termination criteria has to be stored in res.
 *
 * An \omega = 1 GS - implementation is given within sor.c.
 *
 * @param 	omg		relaxation factor omega
 * @param 	dx		cell length x-direction
 * @param 	dy		cell length y-direction
 * @param 	imax		number of cells in x-direction
 * @param 	jmax		number of cells in Y-direction
 * @param	P		The Pressure matrix
 * @param	RS		The right-hand side of the pressure equation
 * @param	res		The residual
 * @param	Flag		The fluid-obstacle flags matrix
 * @param	dp		The pressure difference between the left and right boundaries
 */
void sor(
	double omg,
	double dx,
	double dy,
	int    imax,
	int    jmax,
	double **P,
	double **RS,
	double *res,
	int **Flag,
	double dp
);


#endif
